<template>
	<view class="wrap">
		<view class="item" v-for="item in all">
			<view class="month-wrap s-flex-r-b-c" @click="item.show=!item.show">
				<view class="month s-flex-r-s-c">
					<text class="m">7月</text>
					<u-icon name="arrow-down" color="#666666" size="28"></u-icon>
				</view>
				<view class="all-money">
					总收益：53元
				</view>
			</view>
			<view class="list" v-if="item.show">
				<view class="item s-flex-r-b-c" v-for="m in item.list" :key="m.id">
					<view class="l s-flex-r-s-c">
						<image class="img" src="/static/images/indexnew/monry.png" mode=""></image>
						<view class="type-date">
							<view class="type">佣金发放</view>
							<view class="time">2024-07-12 12:36</view>
						</view>
					</view>
					<view class="money">
						+0.18
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				details:'',
				all:[
					{
						name:'昨日',
						id:'1',
						show:true,
						list:[
							{},
							{},
							{},
						]
					},
					{
						name:'本月',
						id:'2'
					},
					{
						name:'本年',
						id:'3'
					},
				]
			};
		},
		onLoad(e) {
			if(e.id){
				this.id=e.id
				this.getData()
			}
		},
		methods:{
			getData(){
				this.$http('user.getMaterialDetails', {}).then(res => {
					if(res.data){
						this.details = res.data
					}
				});
			}
		}
	}
</script>

<style lang="scss">
.wrap{
	.item{
		.month-wrap{
			padding-left: 32rpx;
			padding-right: 62rpx;
			height: 108rpx;
			.month{
				.m{
					font-weight: 400;
					font-size: 28rpx;
					color: #666666;
					line-height: 33rpx;
					margin-right: 8rpx;
				}
			}
			.all-money{
				font-weight: 400;
				font-size: 28rpx;
				color: #EB5C20;
				line-height: 33rpx;
			}
		}
		.list{
			background: #FFFFFF;
			padding: 20rpx 32rpx;
			.item{
				margin-bottom: 40rpx;
				.l{
					.img{
						width: 48rpx;
						height: 48rpx;
						margin-right: 20rpx;
					}
					.type-date{
						.type{
							font-weight: 400;
							font-size: 28rpx;
							color: #333333;
							line-height: 48rpx;
						}
						.time{
							font-weight: 400;
							font-size: 28rpx;
							color: #999999;
							line-height: 48rpx;
						}
					}
				}
				.money{
					font-weight: 800;
					font-size: 32rpx;
					color: #EB5C20;
					line-height: 38rpx;
				}
			}
		}
	}
}
.s-flex-wrap{
	  flex-wrap: wrap;
  }
  .s-flex-r-s-s {
    display: flex;
  }
  .s-flex-r-s-c {
    display: flex;
    align-items: center;
  }
  .s-flex-r-e-c {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .s-flex-r-c-c {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .s-flex-r-b-c {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .s-flex-r-b-s {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .s-flex-r-b-e {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .s-flex-c-s-s {
    display: flex;
    flex-direction: column;
  }

  .s-flex-c-s-c {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  .s-flex-c-b-s {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
  }

  .s-flex-c-c-c {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .s-flex-c-s-e {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
  }
  .s-flex-c-e-c {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
  }
  .flex1{
	  flex: 1;
  }

</style>
